# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-class-accessor-lite
_pkgname=Class-Accessor-Lite
pkgver=0.08
pkgrel=11
pkgdesc='A minimalistic variant of Class::Accessor.'
arch=('any')
license=('PerlArtistic')
options=('!emptydirs')
depends=('perl')
makedepends=('perl-module-install')
url='https://metacpan.org/pod/Class::Accessor::Lite'
source=("http://search.cpan.org/CPAN/authors/id/K/KA/KAZUHO/$_pkgname-$pkgver.tar.gz")
sha512sums=('e23afed2c0c7eb887d23c80dca1b8b0cc42d38c86f8fcceb87d384b10403e0d74d3ae3b41a9654f4fcb58462ec138f0266a0b7e94d389ecb91d271600c6e293b')

build() {
  cd "$_pkgname-$pkgver"

  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL="--skipdeps" \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
    PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
    MODULEBUILDRC=/dev/null

  perl Makefile.PL
}

package() {
  cd "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
}

